package day15.tcpsocket01;

import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @author Xiao
 * @date 2021/8/9
 */
public class TCPClient01 {
    public static void main(String[] args) throws IOException {
        Socket so = new Socket("127.0.0.1",12312);
        BufferedOutputStream bos = new BufferedOutputStream(so.getOutputStream());
        bos.write("我爱Java！".getBytes());
        bos.close();
        so.close();
    }
}
